import { getVaccinumTree, getJobList } from '@/api/fang-yi/fang-yi.js'

export default {
  data() {
    return {
      jobList: []
    }
  },
  methods: {
    // 获取疫苗树
    async getVaccinumTree() {
      let res = await getVaccinumTree()
      try {
        if (res.code == 1000) {
          this.yiMiaoTree = res.data

          for (let i in res.data) {
            if (res.data[i].name == '春季') {
              this.springYiMiaoList = res.data[i].children
            } else if (res.data[i].name == '秋季') {
              this.autumnYiMiaoList = res.data[i].children
            } 
          }

          this.activeYiMiaoType = res.data[0].name
          this.yiMiaoList = res.data[0].children
        }
      } catch(err) {
        this.$message.error(err);
      }
    },
  }
}